package com.qm.console.dao.dm;

import com.qm.console.model.UserInfo;
import com.qm.console.model.UserInfo;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserInfoMapper {

    List <UserInfo> findByUsername(@Param("username") String username);

    int insertNewUser(@Param("password") String password, @Param("username") String username, @Param("salt") String salt);

    int delUserByUsername(@Param("username") String username);

    int selectUidByUsername(@Param("username") String username);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int deleteByPrimaryKey(Integer uid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int insert(UserInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int insertSelective(UserInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    UserInfo selectByPrimaryKey(Integer uid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int updateByPrimaryKeySelective(UserInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int updateByPrimaryKeyWithBLOBs(UserInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user_info
     *
     * @mbggenerated
     */
    int updateByPrimaryKey(UserInfo record);


    List<UserInfo> getUserInfoList(@Param("offset") int offset,
                                   @Param("pageSize") int pageSize,
                                   @Param("username") String username,
                                   @Param("startTime") String startTime,
                                   @Param("endTime") String endTime,
                                   @Param("orderBy") String orderBy,
                                   @Param("orderType") String orderType);

    int getUserInfoCount(@Param("username") String username,
                         @Param("startTime") String startTime,
                         @Param("endTime") String endTime);






}